package com.example.tool.bean.ddaiexcel;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class AddAiSheetRecordsRequest {
    private Record[] records;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Record {
        private Map<String, Object> fields = new HashMap<>();
        private String[] fieldVals = new String[]{};

        public String[] getFieldVals() {
            return fields.values().stream().map(Object::toString).toArray(String[]::new);
        }
    }

}
